# FROM registry.cn-beijing.aliyuncs.com/groad/python:3.11-slim-buster
FROM python:3.11-buster

WORKDIR /app
COPY ./ ./

# RUN pip install -r requirements.txt
# RUN pip install --upgrade pip setuptools -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
RUN pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com


# RUN pip install --upgrade pip setuptools -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com

# RUN python -m nltk.downloader -d /tmp/llama_index punkt
# RUN apt-get update && apt-get install -y unzip wget
# RUN pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
# RUN wget -P /tmp/llama_index https://mirror.ghproxy.com/https://github.com/nltk/nltk_data/blob/gh-pages/packages/tokenizers/punkt.zip
# RUN unzip /tmp/llama_index/punkt.zip -d /tmp/llama_index
RUN prisma generate


EXPOSE 8068

ENTRYPOINT ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8068"]
